import { GET } from './methods';
export default {
    /**
     * 登录
     * @param {*} data 
     * @data -> grant_type   { string } authorization_code
     *       -> code         { string } 微信登录 code
     *       -> deptId       { string } 课时 ID
     *       -> hospitalCode { string } 医院 code 默认 XH3
     */
    miniLogin: function (data) {
        return GET('/wechat/oauth/miniLogin', data);
    },
    getUserInfo:function(data){
       return GET('/xcx/pt/getUsersInfo')
    },

    getUserInfos: function () {
      let {openid,accountId} = wx.getStorageSync('logindata')
      return GET(`/xcx/pt/getUsersInfoByOpenId?openId=${openid}&accountId=${accountId}`);
    },
    
}